<template>
    <div>
        <slot></slot>
    </div>
</template>

<script>
export default {
    mounted() {
        this.$nextTick(() => {
            const body = document.querySelector('body');
            if (body.append) {
                body.append(this.$el);
            } else {
                body.appendChild(this.$el);
            }
        });
    },
    beforeDestroy() {
         const body = document.querySelector("body");
         body.removeChild(this.$el);
  },
};
</script>